/**
 *
 */
/**
 *
 */
import corejuliano.designpattern.mvc.*;
import corejuliano.ai.*;
import corejuliano.gameelement.agent.*;

import rocknrollracing.gameelement.agent.*; 
import rocknrollracing.gameelement.*;

import util.*;
 
class rocknrollracing.gameelement.agent.AgentPixel extends GameElement
{
	private var intelligence:Intelligence;
	
	public function AgentPixel(id:String)
	{
		super(id);
		intelligence = new Intelligence(id);
	}
	
	public function createModel(id:String):Void
	{
		model = new RocknRollRacingAgentModel(id);
	}
	
	public function setIntelligence(intelligence:Intelligence):Void
	{
		this.intelligence = intelligence;
		addObserver(intelligence);
		intelligence.setOwner(this);
	}
	
	public function getIntelligence():Intelligence
	{
		return intelligence;
	}
	
	public function destroy():Void
	{
		intelligence = null;
		model = null;
		super.destroy();
	}
	
}